﻿<?php
require './dag_functions/class_core.php';
$q=$_GET["q"];
/*
$con = mysql_connect('localhost', 'peter', 'abc123');
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }
*/
//mysql_select_db("ajax_demo", $con);

//$sql="SELECT * FROM user WHERE id = '".$q."'";

//$result = mysql_query($sql);
$query = DB::query("SELECT DH FROM testdb");
///while($row = DB::fetch($query)) {
///			echo $row['DH']."<br/>";
///		}


$result = DB::query("SELECT * FROM testdb");

echo "<table border='1'>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
<th>Hometown</th>
<th>Job</th>
</tr>";

while($row = DB::fetch($result))
 {
 echo "<tr>";
 echo "<td>" . $row['DH'] . "</td>";
 echo "<td>" . $row['DH'] . "</td>";
 echo "<td>" . $row['DH'] . "</td>";
 echo "<td>" . $row['DH'] . "</td>";
 echo "<td>" . $row['DH'] . "</td>";
 echo "</tr>";
 }
echo "</table>";

?>